package phapp.model.barapp;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import javacommon.base.BaseEntity;


/**
 * <p> 标题: 酒吧台桌, tc_bar_desk_info 数据类 POJO
 * <p>Description: DAO层映射到数据类,页面封装数据映射到数据类
 * <p>Copyright: Copyright (c) 2014-10
 * <p>Company: 
 * @author you name
 * @version 1.0
*/

public class BarDesk extends BaseEntity {
   
   //date formats
   public static final String FORMAT_CREATE_TIME = DATE_TIME_FORMAT;
   
   //columns START
   /**序列*/
   private java.lang.Integer id;
   /**吧台名称*/
   private java.lang.String name;
   /**酒吧ID*/
   private java.lang.Integer barId;
   /**酒吧名*/
   private java.lang.String barName;
   /**创建时间*/
   private java.sql.Timestamp createTime;
 
   /**吧台　在线　总人数*/
   private java.lang.String sunpeople;
 
   
   private java.util.ArrayList idList;
   //columns END

	public BarDesk(){
		
	}
 
	public java.lang.String getSunpeople() {
		return sunpeople;
	}

	public java.lang.String getBarName() {
		return barName;
	}

	public void setBarName(java.lang.String barName) {
		this.barName = barName;
	}

	public void setSunpeople(java.lang.String sunpeople) {
		this.sunpeople = sunpeople;
	}

	public BarDesk(
		java.lang.Integer id
	){
		this.id = id;
	}

   public void setId(java.lang.Integer value) {
      this.id = value;
   }
   
   public java.lang.Integer getId() {
      return this.id;
   }
   public void setName(java.lang.String value) {
      this.name = value;
   }
   
   public java.lang.String getName() {
      return this.name;
   }
   public void setBarId(java.lang.Integer value) {
      this.barId = value;
   }
   
   public java.lang.Integer getBarId() {
      return this.barId;
   }
   public String getCreateTimeString() {
      return date2String(getCreateTime(), FORMAT_CREATE_TIME);
   }
   
   public void setCreateTimeString(String value) {
      setCreateTime(string2Date(value, FORMAT_CREATE_TIME,java.sql.Timestamp.class));
   }
   
   public void setCreateTime(java.sql.Timestamp value) {
      this.createTime = value;
   }
   
   public java.sql.Timestamp getCreateTime() {
      return this.createTime;
   }

   public java.util.ArrayList getIdList() {
      return idList;
   }

   public void setIdList(java.util.ArrayList idList) {
      this.idList = idList;
   }

    /**手动增加属性后,toString,hashCode,equals都要修改*/
   public String toString() {
      return new ToStringBuilder(this)
         .append("Id",getId())
         .append("Name",getName())
         .append("BarId",getBarId())
         .append("CreateTime",getCreateTime())
         .toString();
   }
   
   public int hashCode() {
      return new HashCodeBuilder()
         .append(getId())
         .append(getName())
         .append(getBarId())
         .append(getCreateTime())
         .toHashCode();
   }
   
   public boolean equals(Object obj) {
      if(obj instanceof BarDesk == false) return false;
      if(this == obj) return true;
      BarDesk other = (BarDesk)obj;
      return new EqualsBuilder()
         .append(getId(),other.getId())
         .append(getName(),other.getName())
         .append(getBarId(),other.getBarId())
         .append(getCreateTime(),other.getCreateTime())
         .isEquals();
   }
}

